
package com.the9tcat.funnyalarmclock;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import java.util.Timer;
import java.util.TimerTask;

public class SplashActivity extends Activity {
    
    /** The SPLAS h_ time. */
    private final long SPLASH_TIME = 1000L;
    
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);
        Timer t = new Timer();
        t.schedule(new Task(), SPLASH_TIME);
    }

    /**
     * The Class Task.
     */
    class Task extends TimerTask {

        /*
         * (non-Javadoc)
         * @see java.util.TimerTask#run()
         */
        @Override
        public void run() {
            Intent intent = new Intent();
            intent.setClass(SplashActivity.this, FunnyAlarmActivity.class);
            startActivity(intent);
            finish();
        }
    }
}
